package com.ktjy.sample.entity;

import java.util.*;

public class TypeEntity {
    private String expression;
    private String code;
    private Pet refPet; // 引用外部对象
    private Pet innerPet;
    private String [] array;
    private List<String> list;
    private Set<String>  set;
    private Map<String,String> map;
    private Properties props;
    private String emtyValue;
    private String nullValue="初始值,需要设置为null";

    public TypeEntity() {
    }

    public TypeEntity(String expression, String code, Pet refPet, Pet innerPet, String[] array, List<String> list, Set<String> set, Map<String, String> map, Properties props, String emtyValue, String nullValue) {
        this.expression = expression;
        this.code = code;
        this.refPet = refPet;
        this.innerPet = innerPet;
        this.array = array;
        this.list = list;
        this.set = set;
        this.map = map;
        this.props = props;
        this.emtyValue = emtyValue;
        this.nullValue = nullValue;
    }

    //打印所有属性
    public void printAll(){
        System.out.println("expression:"+expression);
        System.out.println("code:"+code);
        if (refPet != null){
            refPet.introduce();
        }
        if (innerPet != null){
            innerPet.introduce();
        }
        System.out.println("array:"+ Arrays.toString( array));
        System.out.println("list:"+list);
        System.out.println("set:"+set);
        System.out.println("map:"+map);
        System.out.println("props:"+props);
        System.out.println("emtyValue:"+emtyValue);
        System.out.println("nullValue:"+nullValue);
    }

    /**
     * 获取
     * @return expression
     */
    public String getExpression() {
        return expression;
    }

    /**
     * 设置
     * @param expression
     */
    public void setExpression(String expression) {
        this.expression = expression;
    }

    /**
     * 获取
     * @return code
     */
    public String getCode() {
        return code;
    }

    /**
     * 设置
     * @param code
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * 获取
     * @return refPet
     */
    public Pet getRefPet() {
        return refPet;
    }

    /**
     * 设置
     * @param refPet
     */
    public void setRefPet(Pet refPet) {
        this.refPet = refPet;
    }

    /**
     * 获取
     * @return innerPet
     */
    public Pet getInnerPet() {
        return innerPet;
    }

    /**
     * 设置
     * @param innerPet
     */
    public void setInnerPet(Pet innerPet) {
        this.innerPet = innerPet;
    }

    /**
     * 获取
     * @return array
     */
    public String[] getArray() {
        return array;
    }

    /**
     * 设置
     * @param array
     */
    public void setArray(String[] array) {
        this.array = array;
    }

    /**
     * 获取
     * @return list
     */
    public List<String> getList() {
        return list;
    }

    /**
     * 设置
     * @param list
     */
    public void setList(List<String> list) {
        this.list = list;
    }

    /**
     * 获取
     * @return set
     */
    public Set<String> getSet() {
        return set;
    }

    /**
     * 设置
     * @param set
     */
    public void setSet(Set<String> set) {
        this.set = set;
    }

    /**
     * 获取
     * @return map
     */
    public Map<String, String> getMap() {
        return map;
    }

    /**
     * 设置
     * @param map
     */
    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    /**
     * 获取
     * @return props
     */
    public Properties getProps() {
        return props;
    }

    /**
     * 设置
     * @param props
     */
    public void setProps(Properties props) {
        this.props = props;
    }

    /**
     * 获取
     * @return emtyValue
     */
    public String getEmtyValue() {
        return emtyValue;
    }

    /**
     * 设置
     * @param emtyValue
     */
    public void setEmtyValue(String emtyValue) {
        this.emtyValue = emtyValue;
    }

    /**
     * 获取
     * @return nullValue
     */
    public String getNullValue() {
        return nullValue;
    }

    /**
     * 设置
     * @param nullValue
     */
    public void setNullValue(String nullValue) {
        this.nullValue = nullValue;
    }

    public String toString() {
        return "TypeEntity{expression = " + expression + ", code = " + code + ", refPet = " + refPet + ", innerPet = " + innerPet + ", array = " + array + ", list = " + list + ", set = " + set + ", map = " + map + ", props = " + props + ", emtyValue = " + emtyValue + ", nullValue = " + nullValue + "}";
    }
}
